from likeshop.base.mybase import Tools


# 收藏商品
class collect_model(Tools):
    # 定义登录路径
    path = "/page/collect/handleCollectGoods"

    # 发送登录请求
    def collect_action(self, xz, sid, db):
        mydata = {
            'is_collect': xz,
            'goods_id': sid
        }
        res = self.session.post(url=self.hosturl+self.path, data=mydata, headers=db)
        return res.json()
